package com.aaa.doctor.feign;

import com.aaa.entity.User;
import com.aaa.vo.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

/**
 * @version 1.8.0_181
 * @Author ZXJ
 * @Date 2023/3/29 9:08
 * @注释
 */
@FeignClient(value = "his-open-system")
public interface UserFeign {


    /**
     * 查询用户表中的用户id和部门id
     * @param map 部门和用户的键值对结构
     * @return  User数组
     */
    @PostMapping("/system/user/queryUserNeedScheduling")
    public List<User> queryUserNeedScheduling(@RequestBody Map<String,Object> map);


    @GetMapping("/system/user/list")
    public List<User> getListAll();

    @GetMapping("/system/user/getByUsername/{username}")
    public User getByUsername(@PathVariable String username);

    @PostMapping("/system/user/getUsernameById/{userId}")
    public String getUsernameById(@PathVariable Long userId);
}
